<template>
  <tr v-for="item in items" :key="item.id" @click="editItem(item)">
    <!-- 表格单元格内容 -->
  </tr>
  <my-modal :item="currentItem" v-if="showModal"></my-modal>
</template>

<script>
import MyModal from "./MyModal.vue";

export default {
  data() {
    return {
      currentItem: {},
      showModal: false,
    };
  },
  methods: {
    editItem(item) {
      this.currentItem = item;
      this.showModal = true;
    },
  },
  components: {
    MyModal,
  },
};
</script>